using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.InputSystem;

public class Lesson11_Main : MonoBehaviour
{
    // Start is called before the first frame update
    void Start()
    {
        Debug.LogFormat("[Lesson11_Main][Start] log...");
        #region PlayerInputManager使用
        // 获取
        // PlayerInputManager.instance
        // 玩家加入
        PlayerInputManager.instance.onPlayerJoined += (playerInput) =>
        {
            Debug.LogFormat("玩家加入 [{0}]", playerInput.name);
        };
        // 玩家离开
        PlayerInputManager.instance.onPlayerLeft += (playerInput) =>
        {
            Debug.LogFormat("玩家离开 [{0}]", playerInput.name);
        };
        #endregion
    }

    // Update is called once per frame
    void Update()
    {
        
    }
}
